class City < Searchable
  set_table_name "cidade"

  belongs_to :country, :foreign_key => 'pais'
  belongs_to :estado     , :foreign_key => 'uf'

  has_many :colegio

  validates_presence_of :id
  validates_presence_of :nome
  validates_presence_of :pais
  validates_presence_of :uf
  validates_uniqueness_of :id
  validates_numericality_of :id

  def to_s
    self.nome
  end
end
